// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 添加弹幕 POST /api/barrage/add */
export async function addBarrageUsingPost(
  body: API.BarrageAddDTO,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>('/api/barrage/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 删除弹幕 POST /api/barrage/delete */
export async function deleteBarrageUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/barrage/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 根据 id 获取完整弹幕信息(管理员) GET /api/barrage/get */
export async function getBarrageByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getBarrageByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBarrage_>('/api/barrage/get', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 根据 id 获取封装后的弹幕 GET /api/barrage/get/vo */
export async function getBarrageVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getBarrageVOByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBarrageVO_>('/api/barrage/get/vo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 分页获取未脱敏弹幕列表(管理员) POST /api/barrage/list/page */
export async function listBarrageByPageUsingPost(
  body: API.BarrageQueryDTO,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageBarrage_>('/api/barrage/list/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 分页获取脱敏后的弹幕列表 POST /api/barrage/list/page/vo */
export async function listBarrageVoByPageUsingPost(
  body: API.BarrageQueryDTO,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageBarrageVO_>('/api/barrage/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 修改弹幕 POST /api/barrage/update */
export async function updateBarrageUsingPost(
  body: API.BarrageUpdateDTO,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/barrage/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
